package com.zd.web.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.zd.entity.Chapter;
import com.zd.entity.Novel;
import com.zd.service.NovelService;
import com.zd.service.impl.NovelServiceImpl;

/**
 * Servlet implementation class SelectchapterWriter
 */
@WebServlet("/SelectchapterWriter")
public class SelectchapterWriter extends HttpServlet {
	private static final long serialVersionUID = 1L;
	NovelService nl=new NovelServiceImpl();
  
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		request.setCharacterEncoding("UTF-8");
		List<Chapter> list=nl.selectChapteraudit();
		request.setAttribute("list", list);
		System.err.println(list);
		request.getRequestDispatcher("ApprovalChapter.jsp").forward(request, response);
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
